<!DOCTYPE html>












  


<html class="theme-next gemini use-motion" lang="Chinese">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
<meta name="theme-color" content="#222">












<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />






















<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.4.0" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.4.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.4.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '6.4.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="BPF、eBPF和IO VisorBPF(BerkeleyPacketFilter，伯克利数据包过滤器）允许在内核态下丢弃那些不需要的数据包，从而避免所有包都从内核态拷贝到用户态的网络监控工具而提升性能(也可采用LIBPCAP函数库实现过滤与捕捉）。 Linux 3.15 开始引入 eBPF。其扩充了 BPF 的功能，丰富了指令集。到了 eBPF 后，虚拟机的功能并都更加强大，使得我们对数据包的操">
<meta name="keywords" content="BCC,eBPF,p4">
<meta property="og:type" content="article">
<meta property="og:title" content="使用BCC提供的转换器将P4转换为eBPF的流程分析">
<meta property="og:url" content="http://blog.zhengzi.me/2017/03/19/e4-bd-bf-e7-94-a8bcc-e6-8f-90-e4-be-9b-e7-9a-84-e8-bd-ac-e6-8d-a2-e5-99-a8-e5-b0-86p4-e8-bd-ac-e6-8d-a2-e4-b8-baebpf-e6-b5-81-e7-a8-8b-e5-88-86-e6-9e-90/index.html">
<meta property="og:site_name" content="政子的博客">
<meta property="og:description" content="BPF、eBPF和IO VisorBPF(BerkeleyPacketFilter，伯克利数据包过滤器）允许在内核态下丢弃那些不需要的数据包，从而避免所有包都从内核态拷贝到用户态的网络监控工具而提升性能(也可采用LIBPCAP函数库实现过滤与捕捉）。 Linux 3.15 开始引入 eBPF。其扩充了 BPF 的功能，丰富了指令集。到了 eBPF 后，虚拟机的功能并都更加强大，使得我们对数据包的操">
<meta property="og:locale" content="Chinese">
<meta property="og:image" content="http://blog.zhengzi.me/wp-content/uploads/2017/03/p42cWorkFlow.png">
<meta property="og:image" content="http://blog.zhengzi.me/wp-content/uploads/2017/03/p4toEbpfWorkFlow2.png">
<meta property="og:image" content="http://blog.zhengzi.me/wp-content/uploads/2017/03/p4toEbpfWorkFlow3.png">
<meta property="og:image" content="http://blog.zhengzi.me/wp-content/uploads/2017/03/ebpfC-TEST.png">
<meta property="og:updated_time" content="2018-08-21T09:49:42.773Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="使用BCC提供的转换器将P4转换为eBPF的流程分析">
<meta name="twitter:description" content="BPF、eBPF和IO VisorBPF(BerkeleyPacketFilter，伯克利数据包过滤器）允许在内核态下丢弃那些不需要的数据包，从而避免所有包都从内核态拷贝到用户态的网络监控工具而提升性能(也可采用LIBPCAP函数库实现过滤与捕捉）。 Linux 3.15 开始引入 eBPF。其扩充了 BPF 的功能，丰富了指令集。到了 eBPF 后，虚拟机的功能并都更加强大，使得我们对数据包的操">
<meta name="twitter:image" content="http://blog.zhengzi.me/wp-content/uploads/2017/03/p42cWorkFlow.png">






  <link rel="canonical" href="http://blog.zhengzi.me/2017/03/19/e4-bd-bf-e7-94-a8bcc-e6-8f-90-e4-be-9b-e7-9a-84-e8-bd-ac-e6-8d-a2-e5-99-a8-e5-b0-86p4-e8-bd-ac-e6-8d-a2-e4-b8-baebpf-e6-b5-81-e7-a8-8b-e5-88-86-e6-9e-90/"/>



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>使用BCC提供的转换器将P4转换为eBPF的流程分析 | 政子的博客</title>
  









  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="Chinese">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">政子的博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
      
        <p class="site-subtitle">强迫症|学习者|伪文青</p>
      
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="Toggle navigation bar">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br />Home</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-about">
    <a href="/about/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-user"></i> <br />About</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />Tags</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />Archives</a>
  </li>

      
      
    </ul>
  

  

  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
            

          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://blog.zhengzi.me/2017/03/19/e4-bd-bf-e7-94-a8bcc-e6-8f-90-e4-be-9b-e7-9a-84-e8-bd-ac-e6-8d-a2-e5-99-a8-e5-b0-86p4-e8-bd-ac-e6-8d-a2-e4-b8-baebpf-e6-b5-81-e7-a8-8b-e5-88-86-e6-9e-90/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Jason Bian">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="政子的博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">使用BCC提供的转换器将P4转换为eBPF的流程分析
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              

              
                
              

              <time title="Created: 2017-03-19 00:01:44" itemprop="dateCreated datePublished" datetime="2017-03-19T00:01:44+08:00">2017-03-19</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">Edited on</span>
                
                <time title="Modified: 2018-08-21 17:49:42" itemprop="dateModified" datetime="2018-08-21T17:49:42+08:00">2018-08-21</time>
              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/P4/" itemprop="url" rel="index"><span itemprop="name">P4</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="BPF、eBPF和IO-Visor"><a href="#BPF、eBPF和IO-Visor" class="headerlink" title="BPF、eBPF和IO Visor"></a>BPF、eBPF和IO Visor</h2><p>BPF(BerkeleyPacketFilter，伯克利数据包过滤器）允许在内核态下丢弃那些不需要的数据包，从而避免所有包都从内核态拷贝到用户态的网络监控工具而提升性能(也可采用LIBPCAP函数库实现过滤与捕捉）。 Linux 3.15 开始引入 eBPF。其扩充了 BPF 的功能，丰富了指令集。到了 eBPF 后，虚拟机的功能并都更加强大，使得我们对数据包的操作都可以在内核灵活地实现，完全不需要加载重新编译，而且可以在线替换等，灵活性大大增加。数据平面也就变得更加灵活（可以随时改变对每个数据包的处理行为）。且在内核中完成该功能使得性能大大提高（避免从内核到用户态的拷贝）。 IO Visor的基本思路是使用一种灵活的方式在内核实现对网络数据包的处理，而不需要像传统的方法那样通过加载内核模块的方式来实现、或者通过繁重的系统调用在用户态计算。从而实现一个灵活的数据平面，加速NFV。 具体说明可以参考：</p>
<ul>
<li>IO Visor仓库对于eBpf的介绍：<a href="https://github.com/iovisor/bpf-docs/blob/master/eBPF.md" target="_blank" rel="noopener">https://github.com/iovisor/bpf-docs/blob/master/eBPF.md</a></li>
<li>IO Visor官方网站：<a href="https://www.iovisor.org/technology/ebpf" target="_blank" rel="noopener">https://www.iovisor.org/technology/ebpf</a></li>
<li>Linux Kernel说明文档：<a href="https://www.kernel.org/doc/Documentation/networking/filter.txt" target="_blank" rel="noopener">https://www.kernel.org/doc/Documentation/networking/filter.txt</a></li>
</ul>
<p>所以，如果可以将P4代码转为eBPF的代码，那么它将可以直接在Linux中以原生的方式运行。可以认为eBPF能够作为类似Behavior Model的P4后端。</p>
<h2 id="P4转eBPF编译器"><a href="#P4转eBPF编译器" class="headerlink" title="P4转eBPF编译器"></a>P4转eBPF编译器</h2><h3 id="转换器"><a href="#转换器" class="headerlink" title="转换器"></a>转换器</h3><p>仓库地址：<a href="https://github.com/iovisor/bcc/tree/master/src/cc/frontends/p4" target="_blank" rel="noopener">https://github.com/iovisor/bcc/tree/master/src/cc/frontends/p4</a> 它的目的是将P4转换为C语言描述的eBPF代码片段，然后使用BCC工具来将C语言代码转换为eBPF代码，然后在Kernel中运行。</p>
<h3 id="依赖——P4-hlir"><a href="#依赖——P4-hlir" class="headerlink" title="依赖——P4-hlir"></a>依赖——P4-hlir</h3><p>仓库地址：<a href="https://github.com/p4lang/p4-hlir" target="_blank" rel="noopener">https://github.com/p4lang/p4-hlir</a> HLIR：high­level intermediate representation 它可以讲P4语言编译为P4的前端中间语言，转换器需要依赖此中间语言。</p>
<h3 id="运行环境——BCC"><a href="#运行环境——BCC" class="headerlink" title="运行环境——BCC"></a>运行环境——BCC</h3><p>仓库地址：<a href="https://github.com/iovisor/bcc" target="_blank" rel="noopener">https://github.com/iovisor/bcc</a> 使用BCC的库可以直接载入转换器转换后的C语言，并切转换为eBPF并运行。</p>
<h2 id="编译器代码分析"><a href="#编译器代码分析" class="headerlink" title="编译器代码分析"></a>编译器代码分析</h2><h3 id="文件结构（大致说明）"><a href="#文件结构（大致说明）" class="headerlink" title="文件结构（大致说明）"></a>文件结构（大致说明）</h3><p>Name</p>
<p>作用</p>
<p>compilationException.py</p>
<p>异常处理</p>
<p>ebpfAction.py</p>
<p>action相关</p>
<p>ebpfConditional.py</p>
<p>状态和跳转（if）相关</p>
<p>ebpfCounter.py</p>
<p>计数器相关</p>
<p>ebpfDeparser.py</p>
<p>Deparser相关</p>
<p>ebpfInstance.py</p>
<p>对Header、Metadata和HeaderStack的声明</p>
<p>ebpfParser.py</p>
<p>和Parser相关</p>
<p>ebpfProgram.py</p>
<p>关键控制代码，从经过hlir parser以后的中取出相关元素，生成对应的类，并且还可控制代码的翻译过程</p>
<p>ebpfScalarType.py</p>
<p>将P4的字段长度映射到C</p>
<p>ebpfStructType.py</p>
<p>和Header类型和Struct类型相关</p>
<p>ebpfTable.py</p>
<p>和match_field流表相关</p>
<p>ebpfType.py</p>
<p>转换成C语言类型的基类</p>
<p>p4toEbpf.py</p>
<p>命令行输入/调用HLIR和ebpfProgram解析P4代码，并生成C语言结构，最后输出</p>
<p>programSerializer.py</p>
<p>生成C语言代码的序列化工具</p>
<p>README.txt</p>
<p>介绍而已</p>
<p>target.py</p>
<p>配置和头文件相关</p>
<p>topoSorting.py</p>
<p>拓扑排序（这里不太明白）</p>
<p>typeFactory.py</p>
<p>header类型表</p>
<h3 id="处理流程"><a href="#处理流程" class="headerlink" title="处理流程"></a>处理流程</h3><p>总流程 <a href="http://blog.zhengzi.me/wp-content/uploads/2017/03/p42cWorkFlow.png"><img src="http://blog.zhengzi.me/wp-content/uploads/2017/03/p42cWorkFlow.png" alt=""></a>构建eBPF实例的准备流程 <a href="http://blog.zhengzi.me/wp-content/uploads/2017/03/p4toEbpfWorkFlow2.png"><img src="http://blog.zhengzi.me/wp-content/uploads/2017/03/p4toEbpfWorkFlow2.png" alt=""></a>转换为C语言序列化的流程</p>
<h3 id="测试用例运行流程"><a href="#测试用例运行流程" class="headerlink" title="测试用例运行流程"></a><a href="http://blog.zhengzi.me/wp-content/uploads/2017/03/p4toEbpfWorkFlow3.png"><img src="http://blog.zhengzi.me/wp-content/uploads/2017/03/p4toEbpfWorkFlow3.png" alt=""></a>测试用例运行流程</h3><p>可以使用转换器目录下的test/endToEndTest.py来测试示例代码</p>
<h2 id="参考资料"><a href="#参考资料" class="headerlink" title="参考资料"></a><a href="http://blog.zhengzi.me/wp-content/uploads/2017/03/ebpfC-TEST.png"><img src="http://blog.zhengzi.me/wp-content/uploads/2017/03/ebpfC-TEST.png" alt=""></a>参考资料</h2><p>了解IO Visor的技术基石BPF与eBPF：<a href="http://blog.csdn.net/quqi99/article/details/49820419" target="_blank" rel="noopener">http://blog.csdn.net/quqi99/article/details/49820419</a></p>

      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/BCC/" rel="tag"># BCC</a>
          
            <a href="/tags/eBPF/" rel="tag"># eBPF</a>
          
            <a href="/tags/p4/" rel="tag"># p4</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/03/17/e5-85-b3-e4-ba-8e-e8-b7-a8-e5-9f-9f-e9-97-ae-e9-a2-98-e7-9a-84-e4-b8-80-e4-b8-aa-e8-a7-a3-e5-86-b3-e6-96-b9-e6-b3-95/" rel="next" title="关于跨域问题的一个解决方法">
                <i class="fa fa-chevron-left"></i> 关于跨域问题的一个解决方法
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/04/08/p4-e8-99-9a-e6-8b-9f-e5-8c-96-e6-95-b0-e6-8d-ae-e5-b9-b3-e9-9d-a2/" rel="prev" title="译文——P4虚拟化数据平面">
                译文——P4虚拟化数据平面 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Overview
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/images/avatar.jpg"
                alt="Jason Bian" />
            
              <p class="site-author-name" itemprop="name">Jason Bian</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">86</span>
                    <span class="site-state-item-name">posts</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">41</span>
                    <span class="site-state-item-name">categories</span>
                  
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">109</span>
                    <span class="site-state-item-name">tags</span>
                  
                </div>
              
            </nav>
          

          

          

          
          

          
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#BPF、eBPF和IO-Visor"><span class="nav-number">1.</span> <span class="nav-text">BPF、eBPF和IO Visor</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#P4转eBPF编译器"><span class="nav-number">2.</span> <span class="nav-text">P4转eBPF编译器</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#转换器"><span class="nav-number">2.1.</span> <span class="nav-text">转换器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#依赖——P4-hlir"><span class="nav-number">2.2.</span> <span class="nav-text">依赖——P4-hlir</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#运行环境——BCC"><span class="nav-number">2.3.</span> <span class="nav-text">运行环境——BCC</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#编译器代码分析"><span class="nav-number">3.</span> <span class="nav-text">编译器代码分析</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#文件结构（大致说明）"><span class="nav-number">3.1.</span> <span class="nav-text">文件结构（大致说明）</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#处理流程"><span class="nav-number">3.2.</span> <span class="nav-text">处理流程</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#测试用例运行流程"><span class="nav-number">3.3.</span> <span class="nav-text">测试用例运行流程</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#参考资料"><span class="nav-number">4.</span> <span class="nav-text">参考资料</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2018</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Jason Bian</span>

  

  
</div>




  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme – <a class="theme-link" target="_blank" href="https://theme-next.org">NexT.Gemini</a></div>




        








        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    
	
    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>


























  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.4.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.4.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=6.4.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=6.4.0"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.4.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.4.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.4.0"></script>



  



  










  





  

  

  

  

  
  

  

  

  

  

  

</body>
</html>
